Skip to content

Conversation

@lombax85
Copy link

Added a www.* alias to the host. If you create the host site.com, now it can be accessed through site.com and www.site.com

Added a www.* alias to the host. If you create the host site.com, now it can be accessed through site.com and www.site.com
@tealise
Copy link

tealise commented Apr 19, 2016

Shouldn't you also add a flag in case www is not necessary. Example, in the case that you make a subdomain, would you want www.subdomain.domain.com. Probably not.

@RoverWire
Copy link
Owner

Personally, the script is not intendend to be used on production, so www is not necessary, already reject PR related with prepend www, probably the use of both could be, thoughs?

@lombax85
Copy link
Author

Personally I used your script on a production server for non-critic applications (my personal sites) and I think that for this case it fits the need. I agree that I wouldn't use it in a more complex environment. I think that adding the www. would help people who are searching for a rapid way to create ready-to-go virtual hosts on a non critical production environment. I agree too with the other comment that a flag to choose if enable the alias is appropriate, so if you think that the feature can be accepted, I'll do another PR with a specific flag to enable the alias. Let me know

@RoverWire
Copy link
Owner

I think both option would be great, to use domain with/without www prefix

without this fix, the virtual host was placed in /var/www//var/www/virtualhost
@lombax85
Copy link
Author

Hi, I added an optional parameter for adding the virtual alias (not only www, you can choose which alias you want to use) and updated the readme. Moreover, I fixed an issue with nginx directory configuration. I didn't made another pull request for that since my feature was dependent on that fix. Let me know if it is ok now.

@lombax85
Copy link
Author

lombax85 commented Dec 3, 2016

Please see my update on your previous comment here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants